$(function(){
    $('.carousel').carousel({
        interval:3000,
        pause:'hover'
    })
    
    $('#carousel-example-generic').on('slid.bs.carousel', function () {//轮播图页码
        var active_banner_index=$('.carousel-inner').find($('.active')).index()+1
        $('.banner_acitve_index').text(active_banner_index)
        $('.banner_acitve_length').text($('.carousel-inner').find('.item').length)
      })

      $('.language').click(function(){//选择语言
        $('.la').html($(this).clone().html());
        $('.language').toggleClass('hide')
      })

      //根据屏幕大小更换banner图片到移动端
      var client=document.documentElement.clientWidth;
      if(client<=1000){
        $('.tel_banner').show()
        $('.web_banner').hide()
        $('.content_inner_list2').append($('.introduce2'))
      }else{
        $('.web_banner').show()
        $('.tel_banner').hide()
      }
});

(function (doc, win, undefined) {
    var docEl = doc.documentElement,
    resizeEvt = 'orientationchange' in win? 'orientationchange' : 'resize',
    recalc = function () {
    var clientWidth = docEl.clientWidth;
    if (clientWidth === undefined) return;
    docEl.style.fontSize = 100 * (clientWidth / 750) + 'px';
    };
    
    if (doc.addEventListener === undefined) return;
    win.addEventListener(resizeEvt, recalc, false);
    doc.addEventListener('DOMContentLoaded', recalc, false)
    })(document, window);